package com.ccp.dev.qbdms.util;

/**
 * ClassDescribe:
 *
 * @author :milihao
 * @date :2019-04-23 Since:1
 */
public class NumUtils {

	/**
	 * 生成相同位数的数字加1
	 * @param oldString
	 * @param num
	 * @return
	 */
	public static String getNum(String oldString,String num) {
		int n = num.length();
		int newNum = Integer.parseInt(num) + 1;
		String newNumString = String.valueOf(newNum);
		n = Math.min(n, newNumString.length());
		return oldString.substring(0,oldString.length()-n) + newNumString;
	}
}
